import Vue from 'vue'
import Vuex from 'vuex'

Vue.use(Vuex)

const store = new Vuex.Store({
    state: {
        userInfo: ""
    },
    getters: {
        userInfoStore: state => {
            return state.userInfo
        }
    },
    mutations: {
        userInfoStore (state, userinfo) {
            state.userInfo = userinfo
        }
    },
    actions: {
        userInfoStore (context, userinfo) {
            context.commit('userInfoStore', userinfo)
        }
    }
})

export default store